package com.example.bigdata.flink

import org.apache.flink.api.java.ExecutionEnvironment
import org.apache.flink.api.scala._


// 批处理代码 WordCount
object WordCount {
    def main(args: Array[String]): Unit = {
        // 创建一个批处理的执行环境
        val env = ExecutionEnvironment.getExecutionEnvironment

        // 从文件中读取数据
        val inputPath = "input/chapter4_3_6.txt"
        val inputDataSet = env.readTextFile(inputPath)

//        // 分词之后做count
//        val wordCountDataSet = inputDataSet.flatMap(_.toLowerCase.split(" "))
//                .map((_,1))
//                .groupBy(0)
//                .sum(1)
//        val wcd =
//        // 打印输出
//        wordCountDataSet.print()

    }

}
